function [ allstockprice ] = getAllStock( market, index)
    
    query = strcat('select m.ID from market m where m.name=', '''', market, ''';');
    marketID = selectData(query);
    marketID = marketID{1}
    
    query = strcat('select s.Name from security s where s.ID_Market =',  int2str(marketID), ';');
    stocklist = selectData(query);
    stocklistlength = length(stocklist);
    stocklistlength = quantity;
    
    %for i=1:stocklistlength
       query = strcat('select t.ClosePrice from security s, transaction t where s.ID = t.ID_Security and s.ID_Market =', int2str(marketID), ' and s.Name =', '''', stocklist{index}, ''';');
       stockprice = selectData(query);
    %end
    
    %if (strcmpi(market,'HOSE')||strcmpi(market,'HNX'))
        %query = strcat('select t.Date, s.Name, t.ClosePrice from security s, transaction t where s.ID = t.ID_Security and s.ID_Market =', int2str(marketID), ';');
    %end
        %query = strcat('select t.Date, s.Name, t.ClosePrice from security s, transaction t where s.ID = t.ID_Security');
    %end
    query
    allstockprice = stockprice;
end

